<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const str = "he 1 l 2 l 3 o";

      // 根据正则表达式匹配结果，返回
      console.log(str.match(/\d/g));
      console.log(str.match(/\w/g));
      console.log(str.match(/./g));
    </script>
  </body>
</html>
